import Vue from 'vue'
import App from './App'
import router from './router'
import ElementUI from 'element-ui'
import 'element-ui/lib/theme-chalk/index.css'
import axios from 'axios'
import './assets/css/global.css'
import './assets/fonts/iconfont.css'
import store from './store'
// import Blob from './assets/js/Blob.js'
// import Export2Excel from './assets/js/Export2Excel.js'

axios.interceptors.request.use(config=>{
  console.log(config)
  //为请求头对象，添加Token验证的Authorization 字段
  config.headers.Authorization = window.sessionStorage.getItem('token')
  return config
})

Vue.prototype.$http = axios
Vue.config.productionTip = false
Vue.use(ElementUI)
// Vue.prototype.$message = Message
// Vue.prototype.$confirm = MessageBox.confirm
/* eslint-disable no-new */

new Vue({
  el: '#app',
  router,
  store,
  components: { App },
  template: '<App/>'
})
